package com.wondertek.poms.dao.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;


@Data
@Entity
@Table(name = "EMERGENCY_BC_LOG")
@DynamicUpdate
@DynamicInsert
@Proxy(lazy = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class EmergencyBcLog {

	private static final long serialVersionUID = -3032254766761106041L;


	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "EMERGENCY_BC_LOG_SEQ")
	@SequenceGenerator(name = "EMERGENCY_BC_LOG_SEQ", allocationSize = 1, sequenceName = "EMERGENCY_BC_LOG_SEQ")
	private Long id;
	@Column(name="CONTENT_ID")
	private String contentId;
	@Column(name="CONTENT_NAME")
	private String contentName;//内容名称
	@Column(name="EMERGENCY_LEVEL")
	private String emergencyLevel; //0：普通 1：热点2：紧急 50：急速
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "CREATE_TIME")
	private Date createTime;
	@Column(name="OPR_CODE")
	private String oprCode;//1成功 2：失败
	private String reason;


	public EmergencyBcLog(String contId, String name, String level, String s, String emergencyBcContentError) {
	}
}
